<%@page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="x" uri="/soar-bx-tags"%>
<x:HeaderParts modal="true"/>
<x:MainPartsTag modal="true">
<x:zone name="MainZone">
<x:Form action="auth/appmenu.shtml">
<x:ParamsParts>
<x:TextField name="id" type="hidden" value="appmenu.ID"/>
<x:TextField name="pid" type="hidden" value="pid"/>
<x:TextField name="muLevel" type="hidden" value="muLevel"/>
</x:ParamsParts>
<x:DataViewParts>
<style type="text/css">
.inline{display: inline-block;margin:0;margin-left: 20px;font-weight: normal;}
</style>
<x:PanelBody>
<s:if test="(appmenu.MU_LEVEL < 4 && appmenu.MU_LEVEL != '') && (muLevel < 3 && muLevel != '')">
<tr>
	<td>名称：</td><td><x:TextField name="muName" title="名称" isMust="1" value="appmenu.MU_NAME" />
	<x:TextField name="muIcon" title="图标" value="appmenu.MU_ICON" type="hidden"/>
	<span class="dropdown">
	<button class="btn btn-default btn-xs dropdown-toggle" type="button" id="iconbtn" onclick="chooseIcon()" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
	    <s:if test="appmenu.MU_ICON != null && appmenu != null && appmenu.MU_ICON != \"\""><span class='${appmenu.MU_ICON }' aria-hidden='true'></span></s:if>
	    <s:else>
	    	选取图标
	    </s:else>
	</button>
	</span>
	</td>
	<td>编码：</td><td><x:TextField name="modeCode" title="编码" value="appmenu.MODE_CODE"  isMust="1"/></td>
	<td>排序：</td><td><x:TextField name="muOrder" title="排序" value="appmenu.MU_ORDER" isMust="1" dataType="Int"/></td>
</tr>
<tr>
	<td>显示位置：</td>
	<td colspan="3">
		<label class="radio inline">
			<input type="radio" name="muPostion" value="1" checked="checked">主菜单
		</label>
		<label class="radio inline">
			<input type="radio" name="muPostion" value="2" <s:if test="appmenu.MU_POSTION==2">checked="checked"</s:if>>快捷1
		</label>
		<label class="radio inline">
			<input type="radio" name="muPostion" value="3" <s:if test="appmenu.MU_POSTION==3">checked="checked"</s:if>>快捷2
		</label>
		<label class="radio inline">
			<input type="radio" name="muPostion" value="4" <s:if test="appmenu.MU_POSTION==4">checked="checked"</s:if>>快捷3
		</label>
		<label class="radio inline">
			<input type="radio" name="muPostion" value="5" <s:if test="appmenu.MU_POSTION==5">checked="checked"</s:if>>快捷4
		</label>
		<label class="radio inline">
			<input type="radio" name="muPostion" value="6" <s:if test="appmenu.MU_POSTION==6">checked="checked"</s:if>>快捷5
		</label>
	</td>
	
	<td>显示标志：</td>
	<td>
		<label class="radio inline">
			<input type="radio" name="muDisplay" value="1" checked="checked">展开
		</label>
		<label class="radio inline">
			<input type="radio" name="muDisplay" value="0" <s:if test="appmenu.MU_DISPLAY==0">checked="checked"</s:if>>收起
		</label>
		<label class="radio inline">
			<input type="radio" name="muDisplay" value="9" <s:if test="appmenu.MU_DISPLAY==9">checked="checked"</s:if>>禁用
		</label>
	</td>
</tr>
<tr>
	<td>打开方式：</td><td>
		<label class="radio inline">
			<input type="radio" name="openMode" value="1" checked="checked">原页面
		</label>
		<label class="radio inline">
			<input type="radio" name="openMode" value="2" <s:if test="appmenu.OPEN_MODE==2">checked="checked"</s:if>>新页面
		</label>
		<label class="radio inline">
			<input type="radio" name="openMode" value="3" <s:if test="appmenu.OPEN_MODE==3">checked="checked"</s:if>>自定义
		</label>
	</td>
	<td>菜单模式：</td>
	<td>
		<label class="radio inline">
			<input type="radio" name="muMode" value="0" checked="checked">常规
		</label>
		<label class="radio inline">
			<input type="radio" name="muMode" value="1" <s:if test="appmenu.MU_MODE==1">checked="checked"</s:if>>链接
		</label>
		<label class="radio inline">
			<input type="radio" name="muMode" value="2" <s:if test="appmenu.MU_MODE==2">checked="checked"</s:if>>自定义
		</label>
	</td>
	<td>访问方式：</td>
	<td>
		<label class="radio inline">
			<input type="radio" name="requestMethod" value="0" checked="checked">不控制
		</label>
		<label class="radio inline">
			<input type="radio" name="requestMethod" value="1" <s:if test="appmenu.REQUEST_METHOD==1">checked="checked"</s:if>>GET
		</label>
		<label class="radio inline">
			<input type="radio" name="requestMethod" value="2" <s:if test="appmenu.REQUEST_METHOD==2">checked="checked"</s:if>>POST
		</label>
	</td>
</tr>
</s:if>

<s:if test="muPlatform != null">
<x:TextField name="muPlatform" type="hidden" value="muPlatform"/>
</s:if>
<s:elseif test="appmenu.MU_PLATFORM !=  null">
<x:TextField name="muPlatform" type="hidden" value="appmenu.MU_PLATFORM"/>
</s:elseif>
<s:else>
<tr>
	<td>终端平台：</td>
	<td colspan="5">
		<label class="radio inline">
			<input type="radio" name="muPlatform" value="1" checked="checked"><i class="fa fa-windows fa-2x"></i>
		</label>
		<label class="radio inline">
			<input type="radio" name="muPlatform" value="2" <s:if test="appmenu.MU_PLATFORM==2">checked="checked"</s:if>><i class="fa fa-mobile fa-2x"></i>
		</label>
	</td>
</tr>
</s:else>
<s:if test="(appmenu.MU_LEVEL < 4 && appmenu.MU_LEVEL != '') && (muLevel < 3 && muLevel != '')">
<tr>
	<td>菜单链接：<br><span data-toggle="tooltip" data-placement="top" data-html="true" style="color:red" title="<p align='left'>1.内链接：以'/'开头，如:'/demo/index.shtml';</p><p align='left'>2.外链接：加上'http'，如'http://www.zjgeport.com';</p><p align='left'>3.js代码：加上javascript，如'javascript:show()'</p>">｛说明｝</span></td>
	<td colspan="5">
	<textarea style="height: 100px;width: calc(100% - 2px);" name="muUrl" title="链接">${appmenu.MU_URL }</textarea>
	</td>
</tr>
</s:if>
<s:else>
<tr>
	<td>名称：</td><td><x:TextField name="muName" title="名称" isMust="1" value="appmenu.MU_NAME" /></td>
</tr>
<tr>
	<td>编码：</td><td><x:TextField name="modeCode" title="编码" value="appmenu.MODE_CODE"  isMust="1"/></td>
</tr>
<tr>
	<td>排序：</td><td><x:TextField name="muOrder" title="排序" value="appmenu.MU_ORDER" isMust="1" dataType="Int"/></td>
</tr>
</s:else>
</x:PanelBody>
<x:PanelFooter>
<x:ButtonsParts>
<x:Button role="success" value="保存" onclick="doSave()"></x:Button>
<x:Button role="default" value="关闭" onclick="X.CloseLayer()"></x:Button>
</x:ButtonsParts>
</x:PanelFooter>
</x:DataViewParts>

<x:JsParts fn="doSave,chooseIcon">
function chooseIcon()
{
	X.Modal('auth/resicon!selIcon.shtml','','','700px','90%','选择图标');
}
function dochoose(icon)
{
	$("#muIcon").val(icon);
	$("#iconbtn").html("<span class='"+icon+"' aria-hidden='true'></span>");
}
function doSave()
{
	X.Submit("doSave",1,true);
}
</x:JsParts>
</x:Form>
</x:zone>
</x:MainPartsTag>
